﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Net
{
    /// <summary>
    /// 用于收发数据的接口
    /// </summary>
    public interface INetProcess
    {

        int ReadTimeout { get; set; }
        string ReadLine();
        int ReadByte();
        int Read(byte[] buffer, int offset, int count);

        void Write(string text);
        void Write(byte[] buffer, int offset, int count);
        void WriteLine(string text);

        string CheckStatus();
        void DiscardInBuffer();
        void DiscardOutBuffer();

        event EventHandler Disposed;
        void Dispose();
    }
}
